<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="../../templates/ui.xhtml">

	<ui:define name="content">

		<h:form enctype="multipart/form-data" id="weather">
			<p:fileUpload fileUploadListener="#{weatherBean.handleFileUpload}"
				mode="advanced"
				update=":headerform:growl :weather:weatherTable :weather"
				auto="true" sizeLimit="100000" allowTypes="/(\.|\/)(dat)$/" />

			<p:commandButton actionListener="#{weatherBean.show}" value="Göster"
				id="weatherButton" update=":weather"
				rendered="#{weatherBean.file != null}" />

			<p:dataTable value="#{weatherBean.weatherList}" var="weather"
				rendered="#{weatherBean.weatherList != null}" id="weatherTable">

				<f:facet name="header">
					<h:outputText value="Hava Durumu Bilgileri" />
				</f:facet>


				<p:column sortBy="#{weather.day}">
					<f:facet name="header">
						<h:outputText value="Gün" />
					</f:facet>
					<h:outputText value="#{weather.day}" />
				</p:column>
				<p:column sortBy="#{weather.maxT}">
					<f:facet name="header">
						<h:outputText value="Max" />
					</f:facet>
					<h:outputText value="#{weather.maxT}" />
				</p:column>
				<p:column sortBy="#{weather.minT}">
					<f:facet name="header">
						<h:outputText value="Min" />
					</f:facet>
					<h:outputText value="#{weather.minT}" />
				</p:column>

			</p:dataTable>
		</h:form>
	</ui:define>



</ui:composition>
